package com.kdzy.lshy.common.controller;

import com.kdzy.lshy.common.service.IDCheckService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;

/**
 * @Auther: hanrui
 * @Date: 2018/6/19
 * @Description:
 * @apiNote 身份证本人验证
 */
@RestController
@CrossOrigin("*")
@RequestMapping(value = "/faced")
@Api(value = "IDCardPersonController")
public class IDCardPersonController {

    @Autowired
    private IDCheckService idCheckService;



    @RequestMapping("/idcard/base64/check")
    @ApiOperation(notes = "/idcard/base64/check", httpMethod = "POST", value = "身份证和照片比对")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", dataType = "String", name = "base64string_id",    value = "身份证base64string", required = true),
            @ApiImplicitParam(paramType = "query", dataType = "String", name = "base64string_photo", value = "照片base64string ", required = true)
    })
    public Object checkInfo(String base64string_id,String base64string_photo, HttpServletRequest request){

        return  idCheckService.checkInfo(base64string_id,base64string_photo,request);

    }
}
